package com.zkj.cloud.payserver.controller;

import com.zkj.cloud.common.dto.R;
import com.zkj.cloud.common.entity.Payment;
import com.zkj.cloud.payserver.service.PaymentServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName: DemoController
 * @Description: TODO
 * @Author: 朱开军
 * @Date: 2021-7-27 18:06
 * @Copyright: © 福建瑞术信息 版权所有
 */
@RestController
@RequestMapping("/demo")
public class DemoController {

    @Autowired
    private PaymentServiceImpl paymentService;

    @GetMapping("/demo")
    public String demo(){
        return "demo test ";
    }

    @GetMapping("/list")
    public R list(){
        List<Payment> list = paymentService.list();
        return R.ok().put("list", list);
    }
}
